package com.xyd.Biz.Impl;

import com.xyd.Biz.CommonTableBiz;
import com.xyd.Dao.CommonTableDao;
import com.xyd.Entity.CommonTable;
import com.xyd.Entity.Page;
import com.xyd.Util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class CommonTableBizImpl implements CommonTableBiz {
    SqlSession sqlSession =null;
    CommonTableDao dao =null;


    public CommonTableBizImpl() {
        sqlSession = SqlSessionFactoryUtil.open();
        dao = sqlSession.getMapper(CommonTableDao.class);
    }

    @Override
    public List<CommonTable> selTittleCommonTable() {
        return dao.selTittleCommonTable();
    }

    @Override
    public CommonTable getCommonTableById(int common_id) {
        return dao.getCommonTableById(common_id);
    }

    @Override
    public int delCommonTableById(CommonTable commonTable) {
        return dao.delCommonTableById(commonTable);
    }

    @Override
    public int addCommonTable(CommonTable commonTable) {
        return dao.addCommonTable(commonTable);
    }

    @Override
    public List<CommonTable> getCommonTableFather() {
        return dao.getCommonTableFather();
    }

    @Override
    public int updateCommonTableById(CommonTable commonTable) {
        return dao.updateCommonTableById(commonTable);
    }

    @Override
    public int getCommonTableCount() {
        return dao.getCommonTableCount();
    }

    @Override
    public List<CommonTable> getAllCommonTableByPage(Page page) {
        return dao.getAllCommonTableByPage(page);
    }
}
